<template>
  <!-- 顶部通栏 -->
  <topNav />
  <!-- 头部 -->
  <appHeader />
  <appHeaderStick />
  <main>
    <!-- 二级路由 -->
    <router-view></router-view>
  </main>
  <appFooter />
</template>

<script>
//  导入顶部组件
import topNav from '@/components/app-topNav.vue'
// 导入头部组件
import appHeader from '@/components/app-header.vue'
// 导入底部组件
import appFooter from '@/components/app-footer.vue'
// 导入粘性导航栏
import appHeaderStick from '@/components/app-header-sticky.vue'
// 导入store
import { useStore } from 'vuex'
// 布局容器
export default {
  name: 'xtx-layout',
  components: { topNav, appHeader, appFooter, appHeaderStick },
  setup () {
    const store = useStore()
    store.dispatch('category/getCateList')
  }
}
</script>

<style scoped lang="less"></style>
